﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServiceImplementation.Translator
{
    /// <summary>
    /// Define DepartmentDTO Translator
    /// </summary>
    public class DepartmentDTOTranslator
    {
        /// <summary>
        /// To Translate DepartmentDTO to DepartmentBusinessEntity
        /// </summary>
        /// <param name="departmentDTO"></param>
        /// <returns></returns>
        public static BLL.Department TranslateDTOToBusiness(DataContracts.DepartmentDTO departmentDTO)
        {
            BLL.Department Department = new BLL.Department();
            Department.DepartmentId = departmentDTO.DepartmentId;
            Department.DepartmentName = departmentDTO.DepartmentName;
            return Department;
        }
        /// <summary>
        /// To Translate DepartmentBusinessEntity to DepartmentDTO
        /// </summary>
        /// <param name="department"></param>
        /// <returns></returns>
        public static DataContracts.DepartmentDTO TranslateBusinessToDTO(BLL.Department department)
        {
            DataContracts.DepartmentDTO DepartmentDTO = new DataContracts.DepartmentDTO();
            DepartmentDTO.DepartmentId = department.DepartmentId;
            DepartmentDTO.DepartmentName = department.DepartmentName;
            return DepartmentDTO;
        }
    }
}
